<template>
  <div id="app">
    <router-view />

    <van-tabbar
      v-show="$route.meta.active <= 4"
      active-color="darkred"
      :value="$route.meta.active"
    >
      <van-tabbar-item replace to="/home" icon="home-o">首页</van-tabbar-item>
      <van-tabbar-item replace to="/theme" icon="label-o">专题</van-tabbar-item>
      <van-tabbar-item replace to="/categroy" icon="apps-o"
        >分类</van-tabbar-item
      >
      <van-tabbar-item replace to="/cart" icon="cart-o">购物车</van-tabbar-item>
      <van-tabbar-item replace to="/user" icon="user-o">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
export default {
  name: "Home",
  created() {},
  components: {},
  data() {
    return {
      active: 4,
    };
  },
};
</script>
<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  background-color: #efefef;
  // padding-bottom: 100px;
}
// 使用了reset-css插件后html字体样式会被覆盖 下面设置失效
// p{
// width: 1rem;
// height: 1rem;
// background-color: red;
// }

html,
body {
  height: 100%;
}
//设置html根元素字体的大小
html {
  // 解决reset-css将html字体大小样式覆盖问题，通过!important提升html标签字体大小属性的权重至最高

  font-size: 100px !important;
  //根元素字体大小为100px那么1rem就是100px 想要设置字体大小为16px就是0.16rem
}
</style>
